<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../../common/mui/mui.min.css" rel="stylesheet" />
		<link href="../../common/css/publicStyle.css" rel="stylesheet" />
		<style>

			.sureBtn{
				height: 50px;
				width: 80%;
				margin-left: 10%;
				margin-bottom: 20px;
				background: white;
				color: #24AF96;
				font-size: 15px;
				line-height: 50px;
				text-align: center;
				box-shadow: 0px 1px 5px darkgrey;
			}
			#msgTextArea{
				margin-top: 0px;
				border-left-width: 0px;
				border-right-width: 0px;
				line-height: 30px;
				font-size: 14px;
				margin-top: 15px;
				height: 150px;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title">编辑短信</h1>
		</header>
		<div class="mui-content">
			<textarea id="msgTextArea" name="" rows="" cols=""></textarea>
			<div id="sureBtn" class="sureBtn">确定</div>
		</div>
		<script src="../../common/mui/mui.js"></script>
		<script type="text/javascript">
			mui.init();
			mui.plusReady(function(){
				var self = plus.webview.currentWebview();
				var msgTextArea = document.getElementById('msgTextArea');
				msgTextArea.value = self.oldMsg;
				
				var sureBtn = document.getElementById('sureBtn');
				sureBtn.addEventListener('tap',function(){
					var msgTextArea = document.getElementById('msgTextArea');
					var nurseStopDeal = plus.webview.getWebviewById('nurseStopDeal');
					if (nurseStopDeal) {
						nurseStopDeal.evalJS("msgEditFinish('" + msgTextArea.value + "')");
					}
					mui.back();
				});
			});
		</script>
	</body>

</html>